package com.panfeng.xcloud.boss.provider.rpc.fallback;

import com.alibaba.fastjson.JSON;
import com.panfeng.xcloud.boss.provider.dto.request.SendEmailReqDTO;
import com.panfeng.xcloud.boss.provider.rpc.member.UserInfoFeignApi;
import com.panfeng.xcloud.common.core.web.vo.ResponseVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

@Slf4j
@Component
public class UserInfoFeignApiFallback implements UserInfoFeignApi {

    @Override
    public ResponseVO sendEmail(@RequestBody SendEmailReqDTO sendEmailReqDTO) {
        log.warn("请求处理异常，触发熔断，请注意查看，sendEmailReqDTO={}", (null != sendEmailReqDTO ? JSON.toJSONString(sendEmailReqDTO) : ""));
        return null;
    }

}
